import React from 'react';
import {createStaticNavigation} from '@react-navigation/native';
import {createDrawerNavigator} from '@react-navigation/drawer';
import Home from './Home';
import About from './About';

export default function App() {
  const RootStack = createDrawerNavigator({
    screenOptions: {
      drawerType: 'slide',
    },
    screens: {
      About: {
        screen: About,
        options: {
          title: '关于',
        },
      },
      Home: {
        screen: Home,
        options: {
          title: '首页',
        },
      },
    },
  });

  const Navigation = createStaticNavigation(RootStack);

  return <Navigation />;
}
